<?php
namespace app\backend\models;

use app\backend\lib\ArDBLib;

class ArticleModel extends ArDBLib{

    public static function tableName(){
        return '@article';
    }

    /**
     * 获取文章
     * @param array $where
     * @return array
     */
    public function getArticleByHot($where=[],$orderBy=''){
        return self::find()->join([['left join','@article_class','@article_class.ac_id = @article.classify_id']])->where($where)->orderBy($orderBy)->all();
    }

}